package com.study;

import com.study.publish.Publish;
import com.study.subscription.Subscription;
import com.study.topic.TopicContainer;

public class Application {
    public static void main(String[] args) {

        Publish pub = new Publish("one");

        Publish pub2 = new Publish("two");

        TopicContainer conter = new TopicContainer();

        conter.addTopic(pub);
        conter.addTopic(pub2);

        Subscription a = new Subscription("aa");
        Subscription b = new Subscription("bbb");
        Subscription c = new Subscription("ccc");
        Subscription d = new Subscription("ddd");
        Subscription e = new Subscription("eeee");

        conter.addSubscript("one", a);

        conter.addSubscript("one", b);

        conter.addSubscript("two", a);

        conter.addSubscript("two", b);

        conter.addSubscript("one", c);

        conter.addSubscript("one", d);

        conter.addSubscript("one", e);

        pub.send("我就是试试");

        pub2.send("我第二试试");

    }
}
